package com.shiyo.spring.annotation.config;

import com.shiyo.spring.annotation.bean.Cat;
import com.shiyo.spring.annotation.bean.Person;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ImportResource;

@Configuration
public class QuickStartConfiguration {
    @Bean
    public Person person() {
        Person person = new Person();
        person.setName("shiyo");
        person.setAge(18);
        return person;
    }

    @Bean
    public Cat cat() {
        Cat cat = new Cat();
        cat.setName("cat");
        cat.setPerson(person());
        return cat;
    }
}
